package ru.rchervot.sanasar.client.model.filters;

import java.util.HashSet;

public class FilterCategories implements Filter {
	
	private HashSet<String> categoriesInclude = new HashSet<String>();
	private HashSet<String> categoriesExclude = new HashSet<String>();
	private boolean includeWithoutCategories;
	private boolean includeActionCategories;
	
	public static final String NAME = "Categories";
	
	public FilterCategories() {
	}
	
	public HashSet<String> getCategoriesInclude() {
		return categoriesInclude;
	}

	public void setCategoriesInclude(HashSet<String> categoriesInclude) {
		this.categoriesInclude = categoriesInclude;
	}

	public HashSet<String> getCategoriesExclude() {
		return categoriesExclude;
	}

	public void setCategoriesExclude(HashSet<String> categoriesExclude) {
		this.categoriesExclude = categoriesExclude;
	}

	public boolean isIncludeWithoutCategories() {
		return includeWithoutCategories;
	}

	public void setIncludeWithoutCategories(boolean includeWithoutCategories) {
		this.includeWithoutCategories = includeWithoutCategories;
	}

	public boolean isIncludeActionCategories() {
		return includeActionCategories;
	}

	public void setIncludeActionCategories(boolean includeActionCategories) {
		this.includeActionCategories = includeActionCategories;
	}

	@Override
	public boolean isEmpty() {
		return categoriesInclude.isEmpty() && categoriesExclude.isEmpty();
	}
	
	@Override
	public String toString() {
		return "FilterCategories[categoriesInclude: " + categoriesInclude.toString() +
		" categoriesExclude: " + categoriesExclude.toString() +
		" includeWithoutCategories: " + includeWithoutCategories + 
		" includeActionCategories: " + includeActionCategories + 
		"]";
	}
	
	@Override
	public String getName() {
		return NAME;
	}
}
